<?php

/**
 * SocialEngine
 *
 * @category   Application_Extensions
 * @package    Sitealbum
 * @copyright  Copyright 2010-2011 BigStep Technologies Pvt. Ltd.
 * @license    http://www.socialengineaddons.com/license/
 * @version    $Id: index.tpl 2011-08-026 9:40:21Z SocialEngineAddOns $
 * @author     SocialEngineAddOns
 */
?>
<?php
 $this->headScript()
    ->appendFile($this->seaddonsBaseUrl().'/application/modules/Sitealbum/externals/scripts/mooRainbow.js');
$this->headLink()->appendStylesheet($this->seaddonsBaseUrl().'/application/modules/Sitealbum/externals/styles/mooRainbow.css');

if( !empty($this->isModsSupport) ):
	foreach( $this->isModsSupport as $modName ) {
		echo "<div class='tip'><span>" . $this->translate("Note: You do not have the latest version of the '%s'. Please upgrade it to the latest version to enable its integration with Advanced Photo Albums Plugin.", ucfirst($modName)) . "</span></div>";
	}
endif;
?>
<h2>
  <?php echo $this->translate("Advanced Photo Albums Plugin") ?>
</h2>

<?php if( count($this->navigation) ): ?>
  <div class='tabs'>
    <?php
      // Render the menu
      //->setUlClass()
      echo $this->navigation()->menu()->setContainer($this->navigation)->render()
    ?>
  </div>
<?php endif; ?>
<?php if (!Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('album')): ?>
<div class="tip">
      <span>
    <?php echo $this->translate("The SocialEngine Photo Albums Plugin is disabled on your site.") ?>
  </span>
</div>
<?php endif; ?>
<div class='settings'>
  <?php echo $this->form->render($this); ?>
</div>

<script type="text/javascript">
  window.addEvent('domready', function() {   
    showads('<?php echo Engine_Api::_()->sitealbum()->showLightBoxPhoto() ?>');
  });

  function showlightboxads(option) {
    if($('sitealbum_adtype-wrapper')) {
      if(option == 0) {
        $('sitealbum_adtype-wrapper').style.display = 'none';
      }
      else {      
        $('sitealbum_adtype-wrapper').style.display = 'block';
        
      }
    }
  }

  function showads(option) {
    if(option == 1) {
      if($('sitealbum_lightboxads-wrapper')) {
        $('sitealbum_lightboxads-wrapper').style.display = 'block';      
         showlightboxads($('sitealbum_lightboxads-1').checked);       
      }
    }
    else {
      if($('sitealbum_lightboxads-wrapper')) {
        $('sitealbum_lightboxads-wrapper').style.display = 'none';
        showlightboxads(0);
      }
    }
  }

   function showwarning(option)
  {
    if(option == 1) {
       Smoothbox.open('<div style="padding: 5px;margin-right:px;"><?php echo $this->string()->escapeJavascript($this->translate('If you have previously made any changes mentioned in \'FAQ\' > \'Customize\' section in FAQ 1 or 2, then please remove the changes done in code as mentioned in Step 3 there. Please click ')).$this->htmlLink(array('route'=>'admin_default','module' => 'sitealbum','controller' => 'settings','action' => 'faq', 'faq_type' => 'customize'), $this->translate('here'), array('target'=>"blank","style"=>"color:#5F93B4;")).$this->string()->escapeJavascript($this->translate(' to follow further process.')) ?></div>');
    }else{
       Smoothbox.open('<div style="padding: 5px; margin-right:5px;"><?php echo $this->string()->escapeJavascript($this->translate('If you do not want to show these albums on Browse Albums Page and Member Profile Page also, then please click ')).$this->htmlLink(array('route'=>'admin_default','module' => 'sitealbum','controller' => 'settings','action' => 'faq', 'faq_type' => 'customize'), $this->translate('here'), array('target'=>"blank","style"=>"color:#5F93B4;")).$this->string()->escapeJavascript($this->translate(' to follow further process.')) ?></div>');
    }
  }
</script>
<div style="padding: 5px;  "></div>